.class public Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;
.super Landroid/widget/BaseAdapter;
.source "PromotionAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field TAG:Ljava/lang/String;

.field list:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/Promotion;",
            ">;"
        }
    .end annotation
.end field

.field private mInflater:Landroid/view/LayoutInflater;


# direct methods
.method public constructor <init>(Ljava/util/ArrayList;Landroid/content/Context;Landroid/widget/ListView;)V
    .locals 1
    .parameter
    .parameter "context"
    .parameter "listView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/Promotion;",
            ">;",
            "Landroid/content/Context;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .prologue
    .line 28
    .local p1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/news/Object/Promotion;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 26
    const-string v0, "BrandAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->TAG:Ljava/lang/String;

    .line 29
    iput-object p1, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->list:Ljava/util/ArrayList;

    .line 30
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 31
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 35
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 40
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 46
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 53
    if-nez p2, :cond_0

    .line 54
    new-instance v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;-><init>(Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;)V

    .line 55
    .local v0, holder:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v3, 0x7f030004

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 56
    const/high16 v2, 0x7f0b

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->name:Landroid/widget/TextView;

    .line 57
    const v2, 0x7f0b0003

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->price:Landroid/widget/TextView;

    .line 58
    const v2, 0x7f0b0001

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iput-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 61
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 66
    :goto_0
    iget-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setVisibility(I)V

    .line 67
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/bitauto/autoeasy/news/Object/Promotion;

    .line 68
    .local v1, promotion:Lcom/bitauto/autoeasy/news/Object/Promotion;
    iget-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/news/Object/Promotion;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 69
    iget-object v2, v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;->price:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/news/Object/Promotion;->getPublishTime()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 71
    return-object p2

    .line 63
    .end local v0           #holder:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;
    .end local v1           #promotion:Lcom/bitauto/autoeasy/news/Object/Promotion;
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;

    .restart local v0       #holder:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter$ViewHolder;
    goto :goto_0
.end method
